package com.zhuoyue.system.service.impl;

import java.util.List;

import com.zhuoyue.common.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhuoyue.system.mapper.SysContentPushMapper;
import com.zhuoyue.system.domain.SysContentPush;
import com.zhuoyue.system.service.ISysContentPushService;

/**
 * 内容通知Service业务层处理
 *
 * @author zhanghui
 * @date 2021-08-24
 */
@Service
public class SysContentPushServiceImpl implements ISysContentPushService {
    @Autowired
    private SysContentPushMapper sysContentPushMapper;

    /**
     * 查询内容通知
     *
     * @param id 内容通知ID
     * @return 内容通知
     */
    @Override
    public SysContentPush selectSysContentPushById(Long id) {
        return sysContentPushMapper.selectSysContentPushById(id);
    }

    /**
     * 查询内容通知列表
     *
     * @param sysContentPush 内容通知
     * @return 内容通知
     */
    @Override
    @DataScope(deptAlias = "s_d")
    public List<SysContentPush> selectSysContentPushList(SysContentPush sysContentPush) {
        return sysContentPushMapper.selectSysContentPushList(sysContentPush);
    }

    /**
     * 新增内容通知
     *
     * @param sysContentPush 内容通知
     * @return 结果
     */
    @Override
    public int insertSysContentPush(SysContentPush sysContentPush) {
        return sysContentPushMapper.insertSysContentPush(sysContentPush);
    }

    /**
     * 修改内容通知
     *
     * @param sysContentPush 内容通知
     * @return 结果
     */
    @Override
    public int updateSysContentPush(SysContentPush sysContentPush) {
        return sysContentPushMapper.updateSysContentPush(sysContentPush);
    }

    /**
     * 批量删除内容通知
     *
     * @param ids 需要删除的内容通知ID
     * @return 结果
     */
    @Override
    public int deleteSysContentPushByIds(Long[] ids) {
        return sysContentPushMapper.deleteSysContentPushByIds(ids);
    }

    /**
     * 删除内容通知信息
     *
     * @param id 内容通知ID
     * @return 结果
     */
    @Override
    public int deleteSysContentPushById(Long id) {
        return sysContentPushMapper.deleteSysContentPushById(id);
    }
}
